import webview

from utils.js_api import JsApi
from utils.logger import Logger
from utils.paths import BasePath

Logger.info(f"运行目录：{BasePath}")


window = webview.create_window(
    title="游戏黑域",
    url="assets/app.html",
    width=1243,
    height=744,
    frameless=True,
    js_api=JsApi()
)

def initialize_window():
    window.evaluate_js(f"window.mainWindowID = \"{window.uid}\"")

webview.start(
    func=initialize_window,
    debug=True
)
